
var Constant = {
     PROTOCOL : "https",
     HOST_URL : "m.52letsgo.cn",
     BETA_URL : "beta.52letsgo.cn",
     PROT : "443",     
}

var ApiInfo = {
    //前缀
     PRE : Constant.PROTOCOL+"://"+ Constant.HOST_URL,
    //接口
     Home: "/mobile/2.0/index",
     HotProduct:"/mobile/product",
     Login:"/mobile/user",
     Code:"/mobile/user",
     findCode:"/mobile/user",
     Register:"/mobile/user",
     ChangePwd:"/mobile/user",
     Citys:"/mobile/city",
     UserInfo:"/mobile/user",
     OrderList: "/mobile/user/order",
     OrderInfo: "/mobile/user/order",
  	 ProductList:"/mobile/product",
     ActiveDay: "/mobile/product",
     AccountLog:"/accountLog",
     Address:"/mobile/user/address",
     BuilderSearch:"/mobile/builder",
     ConsigneeAdd:"/mobile/user/address",
     ConsigneeUpdate:"/mobile/user/address",
     ConsigneeDelete:"/mobile/user/address",
     FeedBack:"/mobile/system",
     CouponList:"/m/Coupon/getUseCoupon",
     DefaultAddress: "/mobile/user/address",
     OrderSubmit: "/mobile/user/order",
     Comment:"/mobile/user/order",
     CancelOrder:"/m/order/cancel",
     OrderPay: "/mobile/user/order",
     OrderSubmit: "/mobile/user/order",
     PayBean:"/pay/payBean",
     CardBalance:"/mobile/prepaid",
     Gift:"/m/Coupon/registerGift",
     CouponCount:"/m/Coupon/couponCount",
     NoTimeOutCouponList:"/m/Coupon/noTimeOutCoupon",
     TimeOutCouponList:"/m/Coupon/timeOutCoupon"
}

function Url (ApiUrl){
    return ApiInfo.PRE+ApiInfo[ApiUrl];
}

function getHostUrl() {
    return Constant.HOST_URL;
}
 

module.exports = {
    //得到开放城市的接口
    Url:Url,
    getHostUrl: getHostUrl
}